<!doctype html>
<html lang="en">
<head th:include="cultivateWeb/header :: culHeaderCss">
</head>
<style>
    .firstLine {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

</style>
<script>
    var _hmt = _hmt || [];
    (function () {
        var hm = document.createElement("script");
        hm.src = "https://hm.baidu.com/hm.js?093a8c24001a87f3d24cf2f6c52cd2e4";
        var s = document.getElementsByTagName("script")[0];
        s.parentNode.insertBefore(hm, s);
    })();
</script>
<body style="background: #fff">
<!--头部部分-->
<header class="heads" th:include="cultivateWeb/header :: header"></header>
<!--banner-->
<div class="phone_hide">
    <div class="banner" style="width: 1200px;margin: 0 auto;">
        <div class="layui-carousel" id="banner" lay-filter="banner">
            <div carousel-item=""></div>
        </div>
    </div>
</div>
<div class="main-md">
    <!-- 公告 -->
    <div style="margin: 20px 0;border-bottom: 1px solid #efefef;">
        <ul>
            <div class="kctit" style="float: left"><span>通知公告：</span></div>
            <div style="float: left" class="layui-carousel" id="tz" lay-filter="tz">
                <div carousel-item="" id="tzc">

                </div>
            </div>
            <div class="cai-trts rt" style="float: right">
                <a href="/cultivate/news?name=通知公告" class="gd on tzSpan">更多 &gt;&gt;</a>
            </div>
            <div class="clear"></div>
        </ul>
    </div>

    <!-- 热门推荐课程 -->
    <div class="rmtjkc aa">
        <div class="xianshi">
            <div class="kctit clear">
                <span>培训课程</span>
                <div class="cai-trts rt">
                    <a href="/cultivate/courseIndex" class="gd on">更多 &gt;&gt;</a>
                </div>
            </div>
            <div class="qiehuan active">
                <ul class="clear" id="course">
                </ul>
            </div>
        </div>
    </div>
    <!-- 其余内容 -->
    <div class="neirong clear">
        <div class="nr-lf lf">
            <div class="rmtjkc aa">
                <div class="xianshi">
                    <div class="kctit clear">
                        <span>讲师专栏</span>
                        <div class="cai-trts rt">
                            <a href="/cultivate/teacher" class="gd on">更多 &gt;&gt;</a>
                        </div>
                    </div>
                    <div class="qiehuan gkk active">
                        <ul class="clear" id="teacher">
                        </ul>
                    </div>
                </div>
            </div>
            <!-- 最新课程-->
            <div class="rmtjkc aa">
                <div class="xianshi">
                    <div class="kctit zxkc clear">
                        <span>应聘就业</span>
                        <!--<em>热门职位:</em>-->
                        <div class="cai-trts rt">
                            <a href="/cultivate/getRecruit" class="gd on">更多 &gt;&gt;</a>
                        </div>
                    </div>
                    <div class="qiehuan gkk active">
                        <ul class="clear" id="job"></ul>
                    </div>
                </div>
            </div>
        </div>
        <div class="nr-rt rt">
            <!-- 证书查询-->
            <!--<div class="zscx">-->
            <!--<div class="kctit clear">-->
            <!--<span>证书查询</span>-->
            <!--</div>-->
            <!--<div class="check">-->
            <!--<label for="">-->
            <!--<em>编号</em>-->
            <!--<input type="text"/>-->
            <!--</label>-->
            <!--<label for="">-->
            <!--<em>姓名</em>-->
            <!--<input type="text"/>-->
            <!--</label>-->
            <!--<button>查询</button>-->
            <!--</div>-->
            <!--</div>-->
            <!-- 机构信息-->
            <div class="ygbk">
                <div class="kctit clear kctit1">
                    <span class="kctit11">培训机构信息</span>
                    <div class="cai-trts rt">
                        <a href="/cultivate/query" class="gd on kctit111">更多 &gt;&gt;</a>
                    </div>
                </div>
                <div class="wenzhang">
                    <ul id="jg">
                    </ul>
                </div>
            </div>
            <div class="ygbk">
                <div class="kctit clear kctit1">
                    <span class="kctit11">行业信息</span>
                    <div class="cai-trts rt">
                        <a href="/cultivate/news?name=行业信息" class="gd on kctit111 hySpan">更多 &gt;&gt;</a>
                    </div>
                </div>
                <div class="wenzhang">
                    <ul id="hy"></ul>
                    <img src="" alt=""/>
                </div>
            </div>
        </div>
    </div>
    <!--创业明星-->
    <div class="rmtjkc aa">
        <div class="xianshi">
            <div class="kctit clear">
                <span>创业明星</span>
                <div class="cai-trts rt">
                    <a href="/cultivate/startUpBus" class="gd on">更多 &gt;&gt;</a>
                </div>
            </div>
            <div class="qiehuan zjjs gkk active">
                <ul class="clear" id="cy">
                </ul>
            </div>
        </div>
    </div>
</div>

<DIV id=move_port class="ygbk"  style="Z-INDEX: 100; LEFT: 2px; WIDTH: 260px; POSITION: absolute; TOP: 43px; HEIGHT: auto;border:1px solid #efefef;background-color:#efefef;
 visibility: visible;"></DIV>


<!--页尾-->
<div class="foots" th:include="cultivateWeb/header :: footer"></div>
<script src="/js/layui/layui.js"></script>
<script src="/js/move.js"></script>
<script>

	
    //banner轮播
    layui.use(['carousel', 'form'], function () {
        var carousel = layui.carousel;
        $.ajax({
            url: "/jzApi/traIndex/selBanners",
            type: 'GET',
            success: function (res) {
                var list = res.data;
                var banners = '';
                list.forEach(function (item, index) {
                    banners += '<div><img src="' + item.value + '" style="height:400px;margin:auto"></div>';
                });
                $("#banner").children('div').html(banners);
                var ins = carousel.render({
                    elem: '#banner',
                    arrow: 'always',
                    width: '100%', //设置容器宽度
                    height: '400px',
                    anim: 'fade' //轮播切换动画方式
                });
                ins.reload({elem: '#banner'});
            }
        });
        //通知列表
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn: '培训就业门户',
                columnName: '通知公告',
                current: 1,
                number: 5
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#news").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        news += '<li class="clone" style="background: #fff">' +
                            '<a href="/notice/newsInfo?name=通知公告&id=' + item.id + '" target="_blank">' +
                            '<span style="font-size:18px">' + item.title + '</span></a></li>'
                    });
                    $("#tzc").html(news);
                }
                //通知公告
                carousel.render({
                    elem: '#tz',
                    arrow: 'none',
                    width: '80%', //设置容器宽度
                    anim: 'updown', //轮播切换动画方式
                    height: '40px',
                    indicator: 'none'
                });
            }
        });
        
      //浮动窗口
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn: '培训就业门户',
                columnName: '漂浮公告',
                current: 1,
                number: 1
            },
            success: function (res) {
                if (res.data.pages == 0) {
                	$("#move_port").hide();
                   // $("#move_port").html('<center><p>暂无公告</p></center>');
                } else {
                    var list = res.data.records;
                    var news = '<div class="kctit clear kctit1"><center><span class="kctit1" style="color:#fff">通知</span></center></div><div class="wenzhang" style="height:auto">';
                    list.forEach(function (item, index) {
                        news +=
                            '<a href="/notice/newsInfo?name=漂浮公告&id=' + item.id + '" target="_blank">' +
                            '<span style="font-size:18px">' + item.title + '</span></a>'
                    });
                    news+="</div>"
                    $("#move_port").html(news);
                }
            }
        });
        
    });

    $(function () {

        //创业明星
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn: '培训就业门户',
                columnName: '创业明星',
                current: 1,
                number: 5
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#news").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        news += '<li><a href="/notice/newsInfo?name=创业明星&id=' + item.id + '" target="_blank">' +
                            '<div style="overflow:hidden"><img src="' + item.thumbnail + '" alt="照片"></div>' +
                            '<div><h1>' + item.title + '</h1></div></a>' +
                            '</li>'
                    });
                    $("#cy").html(news);
                }
            }
        });
        //行业信息
        $.ajax({
            url: "/jzApi/index/selNewsList",
            type: 'GET',
            data: {
                firstColumn: '培训就业门户',
                columnName: '行业信息',
                current: 1,
                number: 10
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#news").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        news += ' <li><a href="/notice/newsInfo?name=行业信息&id=' + item.id + '" target="_blank">' +
                            '  <span>' + item.title + '</span></a></li>'
                    });
                    $("#hy").html(news);
                }
            }
        });
        //课程数据
        $.ajax({
            url: "/jzApi/courses/selCourseList",
            type: 'GET',
            data: {
                name: '',
                profileId: '',
                current: 1,
                number: 12
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#course").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var course = '';
                    list.forEach(function (item, index) {
                        var a = '', b = '';
                        if (item.specialPrice != 0) {
                            a = '¥' + item.specialPrice
                        } else {
                            a = '免费'
                        }
                        if (item.type == 0) {
                            b = '<span class="abSpan orangeSpan">证书课程</span>'
                        } else if (item.type == 1) {
                            b = '<span class="abSpan greenSpan">师资培训课程</span>'
                        } else if (item.type == 2) {
                            b = '<span class="abSpan greenSpan">考评员培训课程</span>'
                        } else if (item.type == 3) {
                            b = '<span class="abSpan greenSpan">高级师资培训课程</span>'
                        } else if (item.type == 4) {
                            b = '<span class="abSpan greenSpan">高级考评员培训课程</span>'
                        }
                        course += '<li><a href="/couInfo/couInfo?id=' + item.id + '">' +
                            '<div style="position: relative"><img src="' + item.thumbnail + '" alt="图片">' + b + '</div>' +
                            '<div>' +
                            '<h1>' + item.name + '</h1>' +
                            '   <h2>' +
                            '       <span class="red lf">' + a + '</span>' +
                            '       <span class="rt" style="color: #666">讲师：' + item.teacherName + '</span>' +
                            '   </h2>' +
                            '</div>' +
                            '</a></li>'
                    });
                    $("#course").html(course);
                }
            }
        });

        //讲师专栏
        $.ajax({
            url: "/jzApi/experts/selExperts",
            type: 'GET',
            data: {
                number: 4,
                current: 1,
                name: '',
                type: 4
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#teacher").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var teacher = '';
                    list.forEach(function (item, index) {
                        var a = '';
                        if (item.headPortrait != "" && item.headPortrait != null) {
                            a = item.headPortrait;
                        } else {
                            a = '/img/timg.jpg'
                        }
                        teacher += '<li style="width: 25%"><a href="/cultivate/teacherDetails?id=' + item.userId + '">' +
                            '        <div style="text-align: center"><img style="width:147px;height:206px" src="' + a + '" alt="图片"></div>' +
                            '         <div><h1>' + item.name + '</h1>' +
                            '          <h2>' +
                            '             <span class="red lf">' + item.kpointsName + '</span>' +
                            // '             <span  class="rt">'+item.orgName+'</span>' +
                            '          </h2></div>' +
                            '         </a></li>'
                    });
                    $("#teacher").html(teacher);
                }
            }
        });

        //职位列表
        $.ajax({
            url: "/jzApi/recruitment/selJobList",
            type: 'GET',
            data: {
                name: '',
                type: 0,
                number: 4,
                current: 1
            },
            success: function (res) {
                if (res.data.pages == 0) {
                    $("#job").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = res.data.records;
                    var job = '';
                    list.forEach(function (item, index) {
                        var b = '';
                        if (item.isTop == 1) {
                            b = '<span class="abSpan redSpan">置顶</span>'
                        }
                        job += '<li style="width:50%;height: 100px"><a href="/cultivate/recruitInfo?id=' + item.id + '">' +
                            '        <div style="text-align: center;float: left;margin-right: 10px;position: relative"><img style="width:80px;height:80px;" src="' + item.thumbnail + '" alt="图片">' + b + '</div>' +
                            '         <div style="float: left;width:58%">' +
                            '           <h1 class="firstLine" style="font-size:18px;color:#000">' + item.name + '</h1>' +
                            '          <h2 class="firstLine" style="font-size:14px;color:#666;margin: 10px 0"><span class="red">' + item.orgName + '</span></h2>' +
                            '          <h2 class="firstLine"><span style="color:#999">' + item.address + '/' + item.workExperience + '/' + item.education + '</span></h2>' +
                            '</div>' +
                            '<div class="zw_2 firstLine" style="float: right">' + item.salaryRange + '</div>' +
                            '<div style="clear: both"></div>' +
                            '         </a></li>'
                    });
                    $("#job").html(job);
                }
            }
        });
        //培训机构列表
        $.ajax({
            url: '/jzApi/organizion/selExaminationPoint',
            data: {
                name: '',
                type: 0,
                current: 1,
                number: 10
            },
            success: function (r) {
                console.log("r", r)
                if (r.data.pages == 0) {
                    $("#jg").html('<div class="noData">暂无数据</div>');
                } else {
                    var list = r.data.records;
                    var news = '';
                    list.forEach(function (item, index) {
                        news += '<li><span style="font-size: 14px">' + item.name + '</span></li>';
                    });
                    $("#jg").html(news);
                }
            }
        });

        $(".classification").mouseenter(function () {
            $(".revi-nav-wrapper").show();
            $(".nav-ce").show();
        });
        $(".nav-ce").mouseleave(function () {
            $(".revi-nav-wrapper").hide();
            $(".nav-ce").hide();
        })
        /*二级导航*/
        $('.list-cn>li').mouseenter(function () {
            $(this).addClass('active').siblings().removeClass('active');
            var n = $(this).index();
            $('.list-d>li').eq(n).addClass('active').siblings().removeClass('active');
            $('.nav-r').fadeIn();
            $('.revi-banner .swiper-pagination-bullet').css('display', 'none');
        });
        $('.nav-ce').on('mouseleave', function () {
            $(this).css({"border": "1px solid transparent", "background-color": "transparent"});
            $('.nav-r').fadeOut();
            // $('.list-d>li').removeClass('active');
            // $('.list-cn>li').removeClass('active');
            $('.revi-banner .swiper-pagination-bullet').fadeIn();
        });
        $('.aptitude-city-ul li').on('onmousedown', 'a', function () {
            $(this).addClass('active').siblings.removeClass('active');
        })
    })

    $('.kctit ul li').click(function () {
        var index = $(this).index();
        $(this).addClass('active').siblings().removeClass('active');
        $('.qiehuan').eq(index).addClass('active').siblings('.qiehuan').removeClass('active');
    })

</script>
</body>

</html>